
<!-- 点评学生列表 -->
<template>
  <div class="page-box h100 display-flex czbj" v-if="imcxzfr">
    <dxtable
      :dataJson="dataJson"
      :portUrl="portUrl"
      :qx="qx"
      ref="databale"
    ></dxtable>
  </div>
</template>
<script lang="ts" setup>
import dxtable from "../../../components/util/dxtable.vue";
import sort from "../../../components/util/sort.vue";
import { dxget, dxpost } from "../../../util/index";
import { NButton, NImage, NTag } from "naive-ui";
import { h, ref, reactive } from "vue";
const databale = ref();
const imcxzfr = ref();
const initeer = () => {
  databale.value.initDataExpose();
};
const uid = ref();
const showModal = ref();
const ksjddfd = ref([]);
let dataJson = [
  {
    title: "学校名称",
    key: "xuexiaoname",
    type: "select",
    options: [],
    width: "",
  },
  {
    title: "姓名",
    key: "xsid",
    type: "select",
    options: [],
    search: true,
    width: "100",
    render: (row) => {
      return row.xname;
    },
  },
  {
    title: "班级",
    key: "pingfeng",
    width: "260",
    render: (row) => {
      return row.njtext + "/" + row.bjname;
    },
  },
  {
    title: "课程名称",
    key: "kcid",
    width: "140",
    type: "select",
    options: [],
    search: true,
    render: (row) => {
      return row.kcname;
    },
  },
  {
    title: "教师姓名",
    key: "jsid",
    width: "120",
    type: "select",
    options: [],
    search: true,
    render: (row) => {
      return row.jsname;
    },
  },
  {
    title: "教师联系电话",
    key: "pingfeng",
    width: "140",
    render: (row) => {
      return row.jsphone;
    },
  },
  {
    title: "评价内容",
    key: "dpneirong",
  },
  {
    title: "点评时间",
    key: "qdri",
    width: 90,
  },
  {
    title: "添加时间",
    key: "addTime",
    width: 150,
  },
];

const qx = {
  DeletePermissionID: "cjiazhangListdel", //删除
  EditPermissionIdentifier: "cjiazhangListbj22", // 编辑
  NewPermissionIdentifier: "cjiazhangListxz22", // 新建
  ViewPermissionID: "cjiazhangListck", // 查看
};
const portUrl = "courseManagement/dianpingxs/dianpingxs?isxn=1";
const initsdr = async () => {
  const { data }: any = await dxget("courseManagement/api/getSelecta");
  console.log(data);
  dataJson[3].options = [
    {
      label: "全部",
      value: "",
    },
    ...data.kecheng,
  ];
  dataJson[1].options = [
    {
      label: "全部",
      value: "",
    },
    ...data.xuesheng,
  ];
  imcxzfr.value = true;

  dataJson[4].options = [
    {
      label: "全部",
      value: "",
    },
    ...data.teacher,
  ];
};
initsdr();

const getschoolManagement = async () => {
  const { data }: any = await dxget(
    "courseManagement/erqi/getschoolManagement"
  );
  ksjddfd.value = data;
  dataJson[0].options = [
    {
      label: "全部",
      value: "",
    },
    ...data,
  ];
};
getschoolManagement();
</script>
<style scoped></style>
